package fr.thelem.gestiondemandesthelem.dao.model;

import static javax.persistence.CascadeType.PERSIST;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * Entity implementation class for Entity: CPPointDeControleEntity
 * 
 */
@Entity
@Table(name = "CP_POINT_DE_CONTROLE")
public class CPPointDeControleEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(nullable = false, name = "IDENTIFIANT_CP_POINT_DE_CONTROLE")
    @GeneratedValue
    private int identifiantCPPointDeControle;

    @Column(name = "VALEUR_POINT_DE_CONTROLE")
    private String valeurPointDeControle;

   /* @ManyToMany(mappedBy = "CDpointDeControlesCPDemandesEffectues")
    private Collection<CPDemandeEntity> CPPointDeControlesEffectues;*/

    @ManyToOne
    @JoinColumn(name = "IDENTIFIANT_CD_POINT_DE_CONTROLE")
    private CDPointDeControleEntity CDPointControleCPPointControle;
    
    @ManyToOne
    @JoinColumn(name = "IDENTIFIANT_CP_DEMANDE")
    private CPDemandeEntity CPdemandeCPPointControle;
    
    


    public CPDemandeEntity getCPdemandeCPPointControle() {
		return CPdemandeCPPointControle;
	}

	public void setCPdemandeCPPointControle(CPDemandeEntity cPdemandeCPPointControle) {
		CPdemandeCPPointControle = cPdemandeCPPointControle;
	}

	/**
     * Constructeur
     */
    public CPPointDeControleEntity() {
        super();
       // this.CPPointDeControlesEffectues = new HashSet<CPDemandeEntity>();
    }

    /**
     * Accesseur de identifiantCPPointDeControle
     * 
     * @return le identifiantCPPointDeControle
     */
    public int getIdentifiantCPPointDeControle() {
        return identifiantCPPointDeControle;
    }

    /**
     * Affectation de identifiantCPPointDeControle
     * 
     * @param identifiantCPPointDeControle identifiantCPPointDeControle à affecter
     */
    public void setIdentifiantCPPointDeControle(int identifiantCPPointDeControle) {
        this.identifiantCPPointDeControle = identifiantCPPointDeControle;
    }

    /**
     * Accesseur de valeurPointDeControle
     * 
     * @return le valeurPointDeControle
     */
    public String getValeurPointDeControle() {
        return valeurPointDeControle;
    }

    /**
     * Affectation de valeurPointDeControle
     * 
     * @param valeurPointDeControle valeurPointDeControle à affecter
     */
    public void setValeurPointDeControle(String valeurPointDeControle) {
        this.valeurPointDeControle = valeurPointDeControle;
    }

    /**
     * Accesseur de cPPointDeControlesEffectues
     * 
     * @return le cPPointDeControlesEffectues
     */
  /*  public Collection<CPDemandeEntity> getCPPointDeControlesEffectues() {
        return CPPointDeControlesEffectues;
    }*/

    /**
     * Affectation de cPPointDeControlesEffectues
     * 
     * @param cPPointDeControlesEffectues cPPointDeControlesEffectues à affecter
     */
  /*  public void setCPPointDeControlesEffectues(Collection<CPDemandeEntity> cPPointDeControlesEffectues) {
        CPPointDeControlesEffectues = cPPointDeControlesEffectues;
    }*/

    /**
     * Accesseur de cDPointControleCPPointControle
     * 
     * @return le cDPointControleCPPointControle
     */
    public CDPointDeControleEntity getCDPointControleCPPointControle() {
        return CDPointControleCPPointControle;
    }

    /**
     * Affectation de cDPointControleCPPointControle
     * 
     * @param cDPointControleCPPointControle cDPointControleCPPointControle à affecter
     */
    public void setCDPointControleCPPointControle(CDPointDeControleEntity cDPointControleCPPointControle) {
        CDPointControleCPPointControle = cDPointControleCPPointControle;
    }

}
